<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .box {
      border-left: 1px solid pink;
      border-bottom: 1px solid pink;
      width: 600px;
      height: 300px;
      margin: 0 auto;
      display: flex;
      justify-content: space-evenly;
      align-items: end;
    }

    .box div {
      background-color: pink;
      width: 60px;
      text-align: center;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
    }

    .box div span {
      margin-top: -20px;
    }

    .box div h4 {
      margin-bottom: -50px;
    }
  </style>
</head>

<body>

  <script>

    let arr = []
    let x = +prompt('请输入要几个季度')
    for (let i = 1; i <= x; i++) {
      // let num = +prompt(`请输入第${i}季度的数据`)
      // arr.push(num)
      arr.push(+prompt(`请输入第${i}季度的数据`))
    }

    document.write(` <div class="box">`)

    for (let j = 0; j < arr.length; j++) {
      document.write(`
      <div style="height: ${arr[j]}px;">
      <span>${arr[j]}</span>
      <h4>第${j + 1}季度</h4>
      </div>
      `)
    }

    document.write(`</div>`)

  </script>
</body>

</html>